<template>
  <div class="plan">
    <div class="breadcrumb">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item>订单质检报告</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-row :gutter="20">
      <el-col :span="8">
        <div class="grid-content bg-purple">
          <QaInfo></QaInfo>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content bg-purple">
          <chart auto-resize style="width:100%;" :options="pieData" theme="walden"></chart>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="grid-content bg-purple">
          <Advise></Advise>
        </div>
      </el-col>
    </el-row>
    <el-row :gutter="20">
      <el-col :span="24">
        <div class="grid-content bg-purple"><img class="imageL" src="../../assets/lalian.png" /></div>
      </el-col>
    </el-row>
  
  
  
  </div>
</template>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
  
  .imageL {
    width: 100%
  }
  
  .el-table .primary-row {
    background: #409EFF;
  }
  
  .el-table .warning-row {
    background: #EB9E05;
  }
  
  .el-table .success-row {
    background: #f0f9eb;
  }
  
  .el-table .danger-row {
    background: #FA5555;
  }
</style>

<script>
  import QaInfo from '@/components/qa/qaInfo'
  import Advise from '@/components/qa/advise'

  import ECharts from 'vue-echarts/components/ECharts.vue'
  import 'echarts/lib/chart/line'
  import 'echarts/lib/chart/pie'
  import 'echarts/lib/component/polar'
  import 'echarts/lib/component/title'
  import 'echarts/lib/component/tooltip'
  import theme from '@/assets/walden.json'
  ECharts.registerTheme('walden', theme)
  
    import pieData from './data/piedata'
  
  export default {
    components: {
      QaInfo,
      Advise
    },
    methods: {
      tableRowClassName({
        row,
        rowIndex
      }) {
        if (row.zt == '1') {
          return 'warning-row'; //等待
        } else if (row.zt == '0') {
          return 'success-row'; //生产
        } else if (row.zt == '2') {
          return 'primary-row'; //完成
        } else if (row.zt == '-1') {
          return 'danger-row'; //错误
        }
        return '';
      }
    },
    data() {
      return {
        pieData:pieData,
      }
    }
  }
</script>


